<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:c="http://java.sun.com/jsp/jstl/core"
      xmlns:h="http://java.sun.com/jsf/html">
<head>
   <title> Main Page</title>
</head>
<body>
<h:form>
   <h:outputLabel value="#{userBean.accountInfo.firstname} Main Page " />
<br></br>
<br></br>
<br></br>
   <c:choose>  
      <c:when test="${empty userBean.resultList.college1}"> 
         <h:outputText value="No Collges Selected"></h:outputText>
      </c:when>  
      <c:otherwise>  
         <table border="1">
         <tr>
            <th> Rank </th>
            <th> College </th>
            <th> Action Taken </th>
         </tr>
         <tr>
            <td> 1 </td>
            <td> #{userBean.resultList.college1} </td>
            <td> #{userBean.resultList.result1} </td>
         </tr>
         <tr>
            <td> 2 </td>
            <td> #{userBean.resultList.college2} </td>
            <td> #{userBean.resultList.result2} </td>
         </tr>
         <tr>
            <td> 3 </td>
            <td> #{userBean.resultList.college3} </td>
            <td> #{userBean.resultList.result3} </td>
         </tr>
         <tr>
            <td> 4 </td>
            <td> #{userBean.resultList.college4} </td>
            <td> #{userBean.resultList.result4} </td>
         </tr>
         <tr>
            <td> 5 </td>
            <td> #{userBean.resultList.college5} </td>
            <td> #{userBean.resultList.result5} </td>
         </tr>
         </table>
      </c:otherwise>  
   </c:choose>  
</h:form>
<h:form>
<br></br>
<br></br>
<br></br>
   <h:commandButton value="Modify Info" 
                    action="#{commonBean.modifyInfo}"/>

   <h:commandButton value="College Results" 
                    action="#{mainBean.displayResultList}"/>

   <h:commandButton value="Logout" 
                    action="#{mainBean.logout}"/>
</h:form>
</body>
</html>